<script type="text/javascript">
			function output_page_reload() {
				// window.location.reload();
				// window.location.href=window.location.href;
				window.location.href = '{$page_url}';
			}
		
			function post_form_submit(contentid, formid) {
				if({MEMBER_ID} < 1) {
					alert("请先登录或者注册一个帐号");
					return false;
				}
				
				var contentv = ($("#" + contentid).val()).trim();
				
				if('{$info[content_default]}' == contentv) {
					alert('内容不能空');
					return false;
				}
				
				
				$.post(
					$('#' + formid).attr('action') + '&in_ajax=1',
					$('#' + formid).serialize(),
					function (r) {
						if(r.done) {
							// alert(r.msg);
							output_page_reload();
						} else {
							alert(r.msg);
							return false;
						}
					},
					'json'
				);
				
				
				return false;
			}

			function reply_forward_click(typev, tidv) {
				$('#reply_forward_form_div_' + tidv).show();
				if('reply' == typev) {		
					$('#type_input_' + tidv).val(typev);
					$('#old_type_input_' + tidv).val(typev);
					$('#type_both_input_' + tidv).attr('checked', false);
					$('#reply_forward_span1_' + tidv).html('转发');
				} else if ('forward' == typev) {
					$('#type_input_' + tidv).val(typev);
					$('#old_type_input_' + tidv).val(typev);
					$('#type_both_input_' + tidv).attr('checked', false);
					$('#reply_forward_span1_' + tidv).html('评论');
				} else if ('both' == typev) {
					if($('#type_both_input_' + tidv).attr('checked')) {
						$('#type_input_' + tidv).val(typev);					
					} else {
						var otiv = $('#old_type_input_' + tidv).val();
						$('#type_input_' + tidv).val(otiv);
					}				
				}
			}

			function reply_first_click() {
				if($('#type_first_input').attr('checked')) {
					$('#type_input').val('first');
				} else {
					var otiv = $('#old_type_input').val();
					$('#type_input').val(otiv);
				}
			}

			$(document).ready(function() {
				{if $info[type_first]}
					$("#type_first_input").click();
					$('#type_input').val('first');
				{/if}
			});
		</script>
		<form id="post_form" method="post" target="_self" action="index.php?mod=output&code=url_iframe_post" onsubmit="return post_form_submit('content_textarea', 'post_form');">
			<input type="hidden" name="id" value="{$id}" />
			<input type="hidden" name="hash" value="{$hash}" />
			<input type="hidden" name="item" value="{$item}" />
			<input type="hidden" name="item_id" value="{$item_id}" />
			<!--{if $info[type_first]}-->
			<input type="hidden" id="type_input" name="type" value="first" />
			<!--{else}-->
			<input type="hidden" id="type_input" name="type" value="reply" />
			<!--{/if}-->
			<input type="hidden" id="old_type_input" name="old_type" value="reply" />
			
			<div class="content_textarea">
            <div class="topic_length">
            <!--{if $this->Config[topic_input_length]>0}--><span style="float:left">您还可以输入<span id="wordCheck">{conf topic_input_length}</span> 字</span><!--{/if}-->
            <a href="{$page_url}" target="_self" onclick="output_page_reload();return false;" class="refresh" title="刷新"></a>
            </div>
            <textarea id="content_textarea" name="content" onkeyup="javascript:checkWord('{conf topic_input_length}',event,'wordCheck')" onkeydown="ctrlEnter(event, 'post_form_btn');">{$info['content_default']}</textarea>
            </div>
            
            <div class="content_input">
                <div class="content_sync">
				<label><input type="checkbox" id="type_first_input" name="type_first" onclick="reply_first_click();" />同时转发给粉丝</label> &nbsp; 
				<!--{if $this->Config[sina_enable] && sina_weibo_init()}-->
				{eval echo sina_weibo_syn();} &nbsp; 
				<!--{/if}-->
				<!--{if $this->Config[qqwb_enable] && qqwb_init()}-->
				{eval echo qqwb_syn();} &nbsp; 
				<!--{/if}-->
				<!--{if $this->Config[kaixin_enable] && kaixin_init()}-->
				{eval echo kaixin_syn_html();} &nbsp; 
				<!--{/if}-->
				<!--{if $this->Config[renren_enable] && renren_init()}-->
				{eval echo renren_syn_html();} &nbsp; 
				<!--{/if}-->
				</div>           
			<!--{if MEMBER_ID < 1 && !($login_extract=jsg_member_login_extract())}-->
				<div class="topic_length_error">请先<a href="index.php?mod=login&referer={$url_encode}&ignore_domain=1">登录</a>或者<a href="index.php?mod=member&referer={$url_encode}&ignore_domain=1">注册</a>一个帐号</div>
			<!--{/if}-->
				<div class="content_input_buttom"><input id="post_form_btn" type="submit" name="formsubmit" value="" class="indexBtn"/></div>
            </div>
            
		</form>